#include "TaskQueue.hpp"
#include "Producer.hpp"
#include "Consumer.hpp"

#include <memory>
#include <iostream>
using std::cout;
using std::endl;
using std::unique_ptr;


int main()
{
    unique_ptr<wd::TaskQueue> ptaskque(new wd::TaskQueue(10));

    wd::Producer producer1(*ptaskque);
    wd::Producer producer2(*ptaskque);
    wd::Producer producer3(*ptaskque);

    wd::Consumer Consumer1(*ptaskque);
    wd::Consumer Consumer2(*ptaskque); 

    producer1.start();
    producer2.start();
    producer3.start();

    Consumer1.start();
    Consumer2.start();

    producer1.join();
    producer2.join();
    producer3.join();
    Consumer1.join();
    Consumer2.join();
    return 0;
}

